package com.xy.blog.core.dao;

import com.xy.blog.core.exception.BaseException;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2020/3/4
 */
public interface IBaseDao<DO> {



    /**
     * 保存
     * @param item
     */
    void save(DO item) throws BaseException;

    /**
     * 根据id更新
     * @param item
     */
    void updateById(DO item) throws BaseException;

    /**
     * 根据id删除
     * @param id
     */
    void deleteById(Long id) throws BaseException;

    /**
     * 获取单个实体
     * @param id
     * @return
     */
    DO getById(Long id) throws BaseException;



}
